1. Field of the Invention
The present invention relates to an image processing method and apparatus therefor for classifying feature points existing in an image.
2. Description of the Related Art
As shown in FIG. 1, linework images generally have several types of feature points such as an open-end point P1, a connection point P2, and a branch point P3. According to the related art, the feature points of a linework image are classified into these types as follows: Firstly the linework image including several linear segments represented by raster data is thinned through thinning processing or core-line formation processing, whereby vector data is obtained representing thinned linear segments of respective parts of the linework image. Each thinned linear segment usually has a width of one pixel. Secondly end points of the thinned linear segments are detected. Then a certain mask area of a predetermined size is applied at each end point. Finally the end point is classified as an N-branch point, where N is an integer, when the mask area includes N pieces of thinned linear segments which have only one end point within the mask area.
FIG. 2A shows a T-shaped linework image, and FIG. 2B shows its thinned linear segments. Linear segments V1, V4, and V5 have only one end point within a mask area MA, and other linear segments V2 and V3 have both their end points within the mask area MA. According to the above method of classification, therefore, the true point in the mask area MA is recognized as a 3-branch point.
In the vicinity of a branch point p3 and a connection point p2, however, a line missing (FIG. 3A) and a protrusion (FIG. 3B) occasionally occurs, and these deformations lead to unsuccessful classifying of the feature points, unless the length and the width of the mask area MA is suitable for the linework images.
The same problems are occur when distortion or break in an image is produced in the process of vectorization of the raster data through the thinning processing or core-line formation processing. For example, in the case of the T-shaped figure explained above (FIG. 2A), some distortion occurs in the vicinity of the 3-branch point Pa, through the thinning processing. In the case of the arrow-shaped figure shown in FIG. 4A, in the process of drawing a core line between outlines (FIG. 4B), a line missing occurs in the vicinity of a 3-branch point Pb as shown in FIG. 4C. Such distortion and line missing may result in incorrect classifying of the feature points.